// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(20,1) == 0;
	question = "special";
	text1 = "You are at the low end of a mountain pass, which you can see rising above you to the west. On the other side of those jagged peaks is the Nodye Coast, one of the oldest and most densely settled of the loyalist provinces.";
	text2 = "This is logging country. Normally, serviles and lumberjacks (many of them descendants of the woods people that lived here before the Shapers came to the Mera-Tev) harvest the Shaper-designed, fast-growing trees that have taken over these woods.";
	text3 = "Most of the loggers have fled, though, hiding in towns and forts because of the wandering infestations of rogues. The only people you see are soldiers. A large force of human warriors is coming down the road toward you.";
	action = SET_SDF 20 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(20,2) == 0;
	question = "special";
	text1 = "This wreckage was once a logging camp. Some brave people tried to fight off the vlish. You aren't sure who won the fight, but there were casualties on both sides.";
	text2 = "If there were any human survivors, they were wise enough to flee.";
	action = SET_SDF 20 2 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says -";
	text2 = "  Nodye Pass - West";
	text3 = "  Penta - North";
	text4 = "  Storm Plains Passes - Southeast";

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This is a small servile with delicate hands. He seems like he was bred to work in a city, perhaps as a servant or a scribe. Being in the woods terrifies him. He holds his baton as if it was some sort of poisonous snake.";
	text2 = "When you try to talk to him, he stammers, _Talk ... talk to Felik. She is leading us._";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The line of soldiers gets close enough for you to get a good look. They are fresh troops, outsiders with newly forged chain mail and blades, just arrived from the Nodye Coast.";
	text2 = "The Shaper provinces that have not yet been directly touched by the war have not skimped on sending warriors and material, in the hope that the carnage will remain at a distance.";
	text3 = "Thus, this line of young, terrified soldiers, completely unprepared for the horrors of the rogues and the Unbound. They show signs of recent skirmishes, probably with the rogues in these woods.";
	text4 = "They walk by you, too terrified to stop and chat. They will learn the grim truth soon enough.";
	action = SET_SDF 20 3 1;

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are two soldiers sitting at this fire. Their armor is filthy and scratched. It looks like they have been in the field for a while. Probably scouts.";
	text2 = "They are muttering to each other quietly. When you get close, they get quiet. They only start talking again after you walk away.";

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Nodye Pass - PAPERS REQUIRED";	



begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Felik";
	text1 = "There are four serviles clumped in this little camp. They are unaccompanied by a human. They are all armed, although three of them seem to be completely unfamiliar with their weapons.";
	text2 = "The servile who seems comfortable with the sword lying across her lap sits and tends to the fire. When you get close, she looks up at you warily.";
	text3 = "_You no outsider. You no Shaper. I Felik. I here with servile. You go. We no hurt you. Leave us be._";
	text4 = "It is fairly clear what is happening here. Felik is a rebel. The other serviles are rogues. A loyal Shaper would deal with them very harshly.";
	text5 = "Felik looks up at you silently. Then she returns to poking at the fire with a stick. Her hand is never far from her sword.";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "There is something I'd like to know.";
	text1 = "Felik pokes at the fire. She doesn't respond.";
	text2 = "Even though she trusts you now, you suspect that she just isn't comfortable talking.";
	code =
		if (gf(20,5) == 0)
			rs(2);
	break;

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = gf(20,5) == 0;
	question = "Do you know anything about the Shadow Road?";
	text1 = "Felik visibly tenses up. She doesn't say anything.";

begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = gf(20,5) == 0;
	question = "Where are you going? Maybe I can help you?";
	text1 = "Felik looks up at you. _You servile. Not all servile good. Some secret work for Shaper. But I need help. I trust._";
	text2 = "Felik looks up at you. _You outsider. Not good to servile._ You speak carefully, and you manage to convince her that you are sympathetic to the rebels. She says, _Things no good. Should not trust. Must trust. Need help._";
	text3 = "Felik looks up at you. _You outsider. Not good to servile._ You try to convince her that she can confide in you, but you don't have any luck.";
	code =
		clear_strings();
		if (creature_type(pc_num()) == 46) {
			as(1);
			sf(20,5,1);
			}
			else if (get_stat(20) > 3){
				as(2);
				sf(20,5,1);
				award_party_xp(50,3);
				}
				else as(3);
	break;
			
begintalknode 14;
	state = 10;
	nextstate = -1;
	condition = gf(20,5) > 0 && get_stat(20) < 6;
	question = "Where are you going?";
	text1 = "Felik shakes her head. _Not say. Told not say. Just please help._";

begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = gf(20,5) > 0 && get_stat(20) >= 6;
	question = "Where are you going?";
	text1 = "You manage to convince Felik to give you a little information. _I take servile away from Shaper. Take to freedom. Told to take to Penta. I take many. Take to Penta. Leave at wall. Go to bottom of pass. Get more._";
	text2 = "_No know where they from. No know how get through pass. No ask._";
	text3 = "The effort of so much speech leaves her visibly tired.";

begintalknode 16;
	state = 10;
	nextstate = -1;
	condition = gf(20,5) > 0;
	question = "Where are you from?";
	text1 = "_I am of Mera-Tev._ She points at the three cowering serviles. _They of coast. Leaving Shapers._ Felik must be one of the rebels who sneak intelligent and unhappy serviles away from the dominion of the Shapers.";

begintalknode 17;
	state = 10;
	nextstate = -1;
	condition = gf(20,5) > 0;
	question = "Do you know anything about the Shadow Road?";
	text1 = "_I do. I know it start near. More, not know. Not told. Many secrets. Not tell if Shaper gets me._";

begintalknode 18;
	state = 10;
	nextstate = 11;
	condition = gf(20,5) > 0;
	question = "What sort of help do you need?";
	text1 = "_Did travel. Saw rogue. Vlish. To east. Can't fight. Slip by is too much risk._";
	text2 = "_Go see for me? Is safe? Can go east to road now?_";

begintalknode 19;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Don't go anywhere yet.";
	text1 = "Felik nods. _Thank you. We stay hid._ You try to talk to her, but she remains silent.";
	action = END_TALK;
	
begintalknode 20;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "It is safe. You can go.";
	text1 = "_Thank you. You outsider, but you help rebel. You good. I make sure rebel know._";
	text2 = "She rouses the other serviles and berates them until they start moving. Then, with one more grateful nod in your direction, they walk off.";
	action = END_TALK;
	code =	
		sf(20,6,1);
		inc_flag(100,0,-3);
		
		activate_hidden_group(1);
		set_level(53,13);
		set_level(54,13);
		set_level(55,13);
		set_level(56,13);
		set_level(57,13);
		set_level(58,13);
	break;
	
begintalknode 21;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "You are rogues! You must die! (Attack.)";
	text1 = "The Shapers would not appreciate it if you let a band of rogue serviles escape. Felik is not surprised at your action. _Shaper agent! Knew it! You not take me alive! Or them!_";
	text2 = "The other three serviles try desperately to remember which end of the baton gets pointed at you. Alas, even an unskilled user can do a lot of damage with one of those things.";
	action = END_TALK;
	code =	
		sf(20,6,1);
		inc_flag(100,0,3);
		set_attitude(1001,10);
	break;

begintalknode 22;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I'll be going now.";
	text1 = "Felik doesn't respond. She doesn't seem to like to talk.";
	action = END_TALK;

	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "This is a tiny post house, where the many merchants and travelers heading to and from the Nodye Coast could stop for a meal and a night's lodging.";
	text2 = "Although there are no customers currently here, the proprietor seems to be exhausted. The floors are dirty and the beds in the common room to the south are currently unmade.";
	text3 = "The lone woman walks up to you, wiping her hands off with a towel. She looks apologetic. _I am Rowena. I'm sorry, but there is little I can do for you. Maybe a meal, but nothing else. My post house is reserved._";
	text5 = "Rowena chats with you as she cleans and prepares for the next load of soldiers. She seems eager for conversation. Her many military customers must not make good company.";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "Your post house is reserved? What do you mean?";
	text1 = "_There are many soldiers coming through the pass from the Nodye Coast. Young men and women, off to fight the war. The military has reserved my inn. All my beds and rations are meant to be held for their use._";
	text2 = "_That means a constant stream of dirty, terrified soldiers. But it keeps me in business._";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Can I get a meal?";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Rowena's Inn",
		  "Rowena is willing to sell you a small portion of the food she is preparing for the next pack of hungry soldiers.",
		  23,3,0);	
	break;

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Can I get a drink?";
	text1 = "_Definitely not. That is the one thing I never have enough of._";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = gf(20,8) == 0 && get_stat(20) > 4;
	question = "Are there no extra supplies for sale? I'd pay extra, and keep it quiet.";
	text1 = "Rowena looks over at the door and gives the matter some thought. _Every once in a while, a soldier forgets something. After a few months, I consider it mine. Normally, I sell these things to Aranov._";
	text2 = "_I could let you look at them first, but you'll have to pay me more than he does._";
	code =
		sf(20,8,1);
		award_party_xp(50,5);
	break;

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = gf(20,8) > 0;
	question = "What lost items can you sell me?";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Rowena's Stuff",
		  "Soldiers forgot these items in Rowena's inn. After they've been unclaimed for a few months, she sells them.",
		  24,5,0);	
	break;

begintalknode 37;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Do they pay you?";
	text1 = "_Thankfully, yes. I was afraid, when the war started, that they would just take what they want. The Shapers are making sure to treat us outsiders honorably, though. I am paid well, and, in return, I work hard to keep the troops happy._";

begintalknode 38;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Are the soldiers well-behaved?";
	text1 = "_Their commanders keep them in line. Apart from the occasional pat on my behind, I have not had problems. The Shapers are making sure that their troops don't make more rebels by misbehaving._";
	text2 = "_At any rate, the soldiers mainly want to spend their time drinking and worrying. They're new to the war, and they're terrified. And they should be._";
	
begintalknode 39;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "They claim all of your rooms and rations?";
	text1 = "_They do. You are here in one of my few lulls. A large band of soldiers just left to watch the southern passes. I'm trying to get everything clean and ready for the next bunch._";

begintalknode 40;
	state = 30;
	nextstate = 33;
	condition = 1;
	question = "Anything you can tell me about the pass?";
	text1 = "_That, if you plan to get through it, you should give up. The Nodye Coast won't let a single traveler or refugee through. They send people. They don't take them back._";
	
begintalknode 41;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Good day to you.";
	text1 = "_Good day. Sorry I couldn't do more for you. And thank you for the company._";
	action = END_TALK;


begintalknode 42;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "Why are they so strict?";
	text1 = "_It's a quarantine, basically. They think that being stern will keep the rebels' bizarre creations away. It won't work, though. It never has before._";

begintalknode 43;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "Seen anyone interesting coming out of the pass?";
	text1 = "_No. I don't look. I don't want anyone mistaking me for a spy. I stay in here and keep things clean and ready. And that's all._";

	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Aranov";
	text1 = "This man's business depended, at first, on selling tools and supplies to the multitude of caravans going to and from the Nodye Coast. The merchants are gone, but a constant stream of soldiers has replaced them.";
	text2 = "When he sees your weapon and garb, he immediately recognizes you as a potential customer. He stops feeding little bits of meat to his stock of batons, wipes the blood off of his hands, and turns to you.";
	text3 = "_I am Aranov, proprietor of this humble shop. I trade with those who choose to live an ... active life. I am always looking for quality equipment to buy, and my prices are the best along this short stretch of road._";
	text5 = "Aranov says, _Please take your time. Inspect my goods. Let me know if you find something to your liking. My prices are sometimes entirely affordable._";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = 51;
	condition = 1;
	question = "You do a lot of business with soldiers?";
	text1 = "_Absolutely. They are my only customers, and they pay well. Good, solid Shaper money. They deal with me honestly, most of the time._";
	text2 = "_I see a lot of the same scouts and procurers, so I maintain a good, regular business. And I make sure to find things they say they're looking for._";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "Let me see your wares.";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Aranov's Equipment",
		  "Aranov sells equipment and weaponry to soldiers and mercenaries. There is a lack of competition nearby. This is reflected in his prices.",
		  25,5,0);	
	break;
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "I would like to sell something.";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = gf(20,9) == 1 && has_item(218);
	question = "I have swamp herbs for you. (Sell them.)";
	text1 = "Aranov takes the herbs and inspects them. He gives each plant a good sniff. Occasionally, he tastes a bit of a leaf. Finally, he says, _Yes, quality stuff. Hope you didn't have any troubles with the Unbound._";
	text2 = "He counts out a tall stack of copper coins for you. _I thank you, and some alchemist somewhere thanks you._";
	code =
		i = take_all_of_item(218);
		change_coins(50 * i);
		award_party_xp(5 * i,12);
	break;
	
begintalknode 55;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "The Shapers deal with you honestly?";
	text1 = "_Never thought you'd see the day, eh? I wouldn't say they're acting humble, but they've learned that there is a point to not aggravating the outsiders every chance they get._";
	
begintalknode 56;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "Don't the soldiers come out of the pass with everything they need?";
	text1 = "_Weapons break. Batons and living tools die unexpectedly. Things get forgotten. Quartermasters mess up._";
	text2 = "_I don't suffer for business._";
	
begintalknode 57;
	state = 51;
	nextstate = 52;
	condition = 1;
	question = "Anything in particular you're looking for now?";
	text1 = "_There is a real shortage of quality herbs from the fen to the east. With all of the Unbound out there, the scavengers can't go out there and gather them._";
	text2 = "_If you can find any bundles of good, quality swamp herbs, I can pay fifty coins for each one._";
	code =
		toggle_quest(57,1);
		sf(20,9,1);
	break;
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "I don't need anything else.";
	text1 = "_Then safe travels to you._ He returns to his squeaking, hungry batons.";
	action = END_TALK;

begintalknode 59;
	state = 52;
	nextstate = -1;
	condition = 1;
	question = "What are they used for?";
	text1 = "_Medicines? Alchemy? Secret Shaper rituals? Dessert toppings? No idea. Not my business._";


//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		